Dynomotion

Group: DynoMotion Message: 11785 From: cnc_machines Date: 6/26/2015
Subject: Hall Motor - Step Response Screen
Tom,

I have been using the "HallComutate.c" program to try to test out my motor. How would I set this motor up on the configuration and flash screen? I would like to tune the motor on the Step Response screen so I can run it closed loop. I understand that hall sensors don't have great resolution, however this will be running a spindle which I would like to hold a constant speed.

Once I have it tuned, would I export these settings to my initializing file? Is there an example C program that could help me with this?

Thanks,

Scott


Group: DynoMotion Message: 11788 From: Tom Kerekes Date: 6/26/2015
Subject: Re: Hall Motor - Step Response Screen
Hi Scott,

Hall Commutation with SnapAmp is not directly supported.  But you can use your HallCommutate.c program to do the commutation and output the Axis Output as the Motor Voltage.  Set the Axis Output Mode to "No Output".   Modify the C Program to output the Chxx->Output value instead of a fixed amplitude.

Do you have encoder feedback?  I suppose you could count Hall Transitions and Use that if you dont.

Regards,
TK

Group: DynoMotion Message: 11823 From: cnc_machines Date: 6/29/2015
Subject: Re: Hall Motor - Step Response Screen
Tom,

I would like to try to do what you are suggesting, but am trying to better understand the details on how to do this. You are right, no encoder I would want to count hall pulses. You post makes this sound fairly simple, a little more detail would be great.

Thanks,

Scott
Group: DynoMotion Message: 11827 From: Tom Kerekes Date: 6/29/2015
Subject: Re: Hall Motor - Step Response Screen
Hi Scott,

I think you could create some logic based on the current and previous hall states to determine when the state changes whether it was a positive or negative motion.  I cant think of an extremely elegant way to do it.  On approach would be to make a table to map the index to a sequence number.  That way each Hall state could be mapped to a consecutive sequence number 0 to 5.  Subtracting the previous sample of the hall state sequence would yield the change. For example if the previous was 3 and the new is 4 then 4 - 3 = 1 so we changed +1.  Or 4-4=0 would be no change.  Or 3 -  4 = -1 would be a chage of -1.  How ever you would need to handle the two wrap around cases.  Previous of 5 and new of 0 would have a result of -5 which should be treated as +1.  Previous of 0 and new of 5 would have a result of +5 and should be treated as a -1.  So something like:


int SequenceTable{8] = {1,3,4,5,99,2,0,99}; // put whatever the real order is and 99 for the two invalid states

.
.
.


New = SequenceTable[Index];

Diff = New-Prev;

if (Diff==1 || Diff == -5)
     ch5->Position++;  // count up
else if (Diff=-1 || Diff == 5)
     ch5->Position--;  // count down
else if (Diff != 0)
     printf('Something wrong\n");;

Prev=Diff;


HTH
Regards
TK